package com.turing.post.salesmanage.util;

import java.math.BigInteger;
import java.util.List;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;
import com.turing.post.util.PCPSWebInput;

/**
 * 充值单业务接口
 * 
 * @author zxp
 * @Jan 17, 2013
 */
@Remote
@Local
public interface DepositOrderBusiness {

	/**
	 * 批量充值创建
	 * 
	 * @param webInput
	 * @param depositOrder
	 * @param cardDetailList
	 * @param depSalesDetail
	 * @param depPaidDetail
	 * @return
	 * @throws PCPSApplicationException
	 */
	public DepositOrder createDepositOrder(PCPSWebInput webInput,
			DepositOrder depositOrder, List<DepositOrderDetail> cardDetailList,
			List<DepositOrderSalesDetail> depSalesDetail,
			List<DepositOrderPaidDetail> depPaidDetail)
			throws PCPSApplicationException;

	/**
	 * 撤销充值单
	 * 
	 * @param webInput
	 * @param depositOrder
	 * @throws PCPSApplicationException
	 */
	public DepositOrder cancelDepositOrder(PCPSWebInput webInput,
			DepositOrder depositOrder) throws PCPSApplicationException;

	/**
	 * 打印充值单时凭证出库
	 * 
	 * @param webInput
	 * @param saleOrderId
	 * @param voucherId
	 * @param voucherNo
	 * @throws PCPSApplicationException
	 */
	public void updateDepositOrderVoucherNo(PCPSWebInput webInput,
			BigInteger depositOrderId, String voucherNo)
			throws PCPSApplicationException;

	/**
	 * 充值单打包上送
	 * 
	 * @param webInput
	 * @param depositOrderIds
	 * @param commitVoucherNo
	 * @throws PCPSApplicationException
	 */
	public void updateDepositOrderCommitVoucherNo(PCPSWebInput webInput,
			BigInteger[] depositOrderIds, BigInteger bankAccDetailId)
			throws PCPSApplicationException;

	/**
	 * 充值单资金审核
	 * 
	 * @param webInput
	 * @param depositOrderIds
	 * @throws PCPSApplicationException
	 */
	public void authDepositOrderMoney(PCPSWebInput webInput,
			BigInteger[] depositOrderIds) throws PCPSApplicationException;

	public void authOneDepositOrderMoney(PCPSWebInput webInput, BigInteger b)
			throws PCPSApplicationException;

	/**
	 * 判断充值单是否含有现金付款
	 * 
	 * @param depositOrderIds
	 * @return
	 */
	public boolean checkCashDepositOrder(BigInteger[] depositOrderIds);

}
